package com.lepan.ovgms.manages.apply;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.lepan.ovgms.R;


/**
 * Created by pc on 2016/5/4.
 */
public class ActivityOkApplyDetails extends Activity implements View.OnClickListener {

    boolean flag = true;
    private RelativeLayout mBack;
    private Button mBackCar;
    private LinearLayout mLinLayout;
    private Button mButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ok_details);
        mBack = (RelativeLayout) findViewById(R.id.rl_back);
        mBackCar = (Button) findViewById(R.id.bt_back_car);
        mButton = (Button) findViewById(R.id.button);
        mLinLayout = (LinearLayout) findViewById(R.id.linLayout);
        mLinLayout.setVisibility(View.GONE);
        mButton.setOnClickListener(this);
        mBack.setOnClickListener(this);
        mBackCar.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rl_back:
                finish();
                break;
            case R.id.button:
                if (flag) {
                    mLinLayout.setVisibility(View.VISIBLE);
                } else {
                    mLinLayout.setVisibility(View.GONE);
                }
                break;
            case R.id.bt_back_car:
                Toast.makeText(getApplicationContext(), "回车成功", Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
